REPLACEMENT CHARACTERS may be entered by keyboard or clipboard as normal characters or as ASCII character codes. Up to 225 pairs of replacement strings may be defined. Each string is limited to 64 characters. Defined pairs are displayed in a scrollable list.
Leave the Change To string blank to remove occurrences of the Find What string. If there are more characters in the Find string than in the Change string, characters will be removed from the document being processed; fewer characters in the Find string than in the Change string will cause characters to be inserted.
Click the New button to insert a new replacement set. The set is inserted at the location shown by the arrow to the right of the scrolling list. Drag the arrow to change the insertion point.
Active strings (those actually used during processing) are shown in black. Inactive strings (ignored during processing) are drawn in gray. Inactive strings can be used to embed comments within the scrolling list or to turn off sets without deleting them from the list. Use the Enable and Disable buttons to make selected strings active or inactive.
Double-click a replacement string in the scrollable list to insert it into the edit text fields. Change the order of replacement by option-dragging a string up or down the list. The destination of an item being dragged is indicated by two triangles on either side of the list. Click and drag the divider line between the text columns to change the column widths.
A checkbox is shown to the left of each replacement set in the list. Replacement strings that ignore case when comparing the current Find What string to existing text display a checkmark in that set’s checkbox. Click a checkbox to quickly toggle ignoring of case for a replacement string.
Use the tab key to select a text entry field or the scrollable list. If the scrollable list is outlined by a black rectangle, the up and down arrow keys may be used to highlight a replacement string entry.
Select an item from the ASCII pop-up menu to insert ASCII codes for wildcards and characters that are difficult to type. Select the Show Chart… item to open a window containing a character table that can be used to locate and insert specific characters into the current edit text field.
Replacement sets can be copied and pasted to and from the clipboard. Highlighted sets are copied to the clipboard as text in the order of Find What string, tab character, Change To string, carriage return. This format is repeated for each replacement set so that copying ten replacement sets places ten lines of text onto the clipboard.
Replacement sets are pasted into the list at the position of the blinking insertion point; highlighted sets are removed prior to the paste. Pasting will try to use whatever text is on the clipboard, using tabs to distinguish between Find What and Change To strings and carriage returns to distinguish sets.
Cutting and then pasting the sets to a new location is the quickest way to reposition several sets within the list. Replacement sets can also be cut or copied to the clipboard and pasted into the Line Replacements list to easily transfer large numbers of sets.
Because documents are read in chunks, with each chunk being read to the next CR, replacement sets that have CRs in the middle of the find string may not always work as expected. Replacements that should match at the beginning or end of lines should probably use Line Replacement Strings, which allow searches to specify matches at the beginning or end of lines.
Chunk size is a function of available application memory. The more memory, the larger the chunk. A/S sets the input chunk size to one-fourth the amount of available application memory when processing is begun, up to a maximum of 128K.
Since searches will not straddle chunks, some search strings may fail to match the target characters because a portion of the target characters exist in more than one chunk. This problem exists primarily for sets that have CRs in the middle and sets that use the any chars wildcard (^@). If these types of sets are in use, it may be a good idea to increase A/S’s preferred memory size so larger (and fewer) chunks are used.